<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('footage_parts', function (Blueprint $table) {
            $table->id();
            $table->string('name', 50)->nullable()->comment('名称');
            $table->unsignedSmallInteger('index');
            $table->unsignedInteger('audio_id');
            $table->decimal('audio_ss')->comment('剪切音频开始时间');
            $table->decimal('audio_t')->nullable()->comment('剪切音频时长');
            $table->unsignedInteger('video_id')->nullable();
            $table->decimal('video_ss')->nullable()->comment('剪切视频开始时间');
            $table->string('path')->nullable()->comment('视频预览路径');
            $table->unsignedInteger('footage_id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('footage_parts');
    }
};
